#pragma once

#include "Math/Math.h"

struct MaterialGpu {
	glm::vec3 emissive;
	glm::vec3 baseColor;
	float subsurface;
	float metallic;
	float specular;
	float specularTint;
	float roughness;
	float anisotropic;
	float sheen;
	float sheenTint;
	float clearcoat;
	float clearcoatGloss;
	float IOR;
	float transmission;

	MaterialGpu()
	{
		emissive = glm::vec3(0.f);
		baseColor = glm::vec3(1.f);
		subsurface = 0.0;
		metallic = 0.0;
		specular = 0.0;
		specularTint = 0.0;
		roughness = 0.0;
		anisotropic = 0.0;
		sheen = 0.0;
		sheenTint = 0.0;
		clearcoat = 0.0;
		clearcoatGloss = 0.0;
		IOR = 1.0;
		transmission = 0.0;
	}
};

struct VertexGpu
{
	glm::vec3 position;
	glm::vec3 normal;
	glm::vec3 tangent;
	glm::vec3 bitangent;
	glm::vec2 uv;
};

struct TriangleGpu {
	glm::uvec3 index;
	uint32 material;
	TriangleGpu()
	{
		material = 0;
	}
	TriangleGpu(glm::uvec3 i, uint32 m) :
		index(i),
		material(m) {}
};

struct BVHNodeGpu
{
	glm::vec3 aa, bb;
	uint32 left, right;
	uint32 n, l;
	BVHNodeGpu()
	{
		left = right = 0;
		n = l = 0;
	}
};

